package ua.at.tsvetkov.samizdat;

import java.io.File;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Environment;
import ua.at.tsvetkov.util.Log;

public class Utils {
	public static String getHomeDirectoryPath(Context context) {
		PackageInfo appData = null;
		try {
			appData = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES);
		} catch (PackageManager.NameNotFoundException e) {
			Log.e("Name of the package is not found");
		}
		return Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/data/" + appData.applicationInfo.packageName + File.separatorChar;
	}

}
